package cn.tlb.xutilsdownload.design;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by 汤林冰 on 2015/11/23 11:28.
 */
public class ExampleFragment extends Fragment {

    public static ExampleFragment getExampleFragment(String content){
        ExampleFragment exampleFragment = new ExampleFragment();
        Bundle args = new Bundle();
        args.putString("content", content);
        exampleFragment.setArguments(args);
        return exampleFragment;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        TextView textView = new TextView(getActivity());

        Bundle args = getArguments();
        String content = args.getString("content");
        textView.setText(content);

        return textView;
    }
}
